<template>
	<view class="content">
		<image :src="img" class="image" mode="widthFix"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: 0,
				img: '',
				title: ''
			}
		},
		/* onReady() {
			uni.setNavigationBarTitle({
				title: this.title
			})
		}, */
		onLoad(options) {
			this.id = options.id ? options.id : 0
			this.allReq()
		},
		methods: {
			allReq() {
				this.$request({
					url: this.$api.navs.list,
					data: {
						pid: 1907,
						status: 1
					}
				}).then((res) => {
					this.img = res.data.list[this.id].icon_url
					this.title = res.data.list[this.id].name
					uni.setNavigationBarTitle({
						title: this.title
					})
				}).catch(() => {

				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.content {
		width: 100%;

		.image {
			width: 100%;
		}
	}
</style>
